package com.yami.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.app.dto.CouponRecordDto;
import com.yami.shop.bean.model.CouponRecord;

import java.util.List;

public interface CouponRecordService extends IService<CouponRecord> {
    List<CouponRecord> selectValidCoupon(CouponRecord couponRecord);

    List<CouponRecord> getByUserIdAndShopId(CouponRecord couponRecord);

    List<CouponRecordDto> selectUseCouponRecord(CouponRecord couponRecord);

    List<CouponRecordDto> getCouponAndRecord(Long recordId);

    /**
     *查询当前会员有没有使用该优惠券
     */
    CouponRecord  getAvailableCouponByUserId(Long couponId,String userId);

}
